import { request } from '@/utils/request'
// 获取用户等级列表
export const getUserGradeListAPI = object => request('admin/user/level/selectPage', 'post', { data: object })

// 改变等级
export const changeGradeAPI = object => request('admin/user/user/edit', 'post', { data: object })

// 取消实名认证
export const unRealAPI = object => request('admin/user/user/unRealname', 'post', { data: object })

// 获取银行列表
export const getBankListAPI = object => request('admin/dict/bank/selectPage', 'post', { data: object })

// 获取排序方式列表
export const getSortListAPI = object => request('admin/user/user/indexDict', 'post', { data: object })

// 获取会员列表
export const getUserListAPI = object => request('admin/user/user/index', 'post', { data: object })

// 新增用户
export const addUserAPI = object => request('admin/user/user/add', 'post', { data: object })

// 批量修改权限
export const editJuriAPI = object => request('admin/user/user/changeStatus', 'post', { data: object })

// 获取短信模板
export const getMessageTemplateAPI = id =>
  request('admin/sms/SmsHandler/getSmsTemplateTypeSelect', 'get', { params: id })

// 获取代管客户列表
export const getClientListAPI = object => request('admin/user/relation/trusteeshipIndex', 'get', { params: object })

// 获取上级列表
export const topListAPI = id => request('admin/user/relation/upperIndex', 'get', { params: id })

// 获取下级列表
export const bottomListAPI = id => request('admin/user/relation/lowerIndex', 'get', { params: id })

//获取手持认证数据
export const handheldAuthentication = object => request('admin/user/RealVerify/index', 'post', { data: object })

// 获取短信模板列表
export const getMessageListAPI = object => request('admin/brand/SmsContentTemplate/index', 'post', { data: object })

// 修改短信名称
export const editMessageNameAPI = object => request('admin/brand/SmsContentTemplate/edit', 'post', { data: object })

// 排序
export const sortAPI = object => request('admin/brand/SmsContentTemplate/sort', 'post', { data: object })

// 删除短信模板
export const delMessageTemplateAPI = object => request('admin/brand/SmsContentTemplate/del', 'post', { data: object })

// 添加模板
export const addTemplateAPI = object => request('admin/brand/SmsContentTemplate/add', 'post', { data: object })

// 获取发送人信息
export const sendInfoAPI = object => request('admin/sms/SmsHandler/getLastSms', 'post', { data: object })

// 发送短信
export const sendMessage = object => request('admin/sms/SmsHandler/sendMessage', 'post', { data: object })

// 大盘分红
export const joinBonusAPI = object => request('admin/brand/CompositeUser/partakeComposite', 'post', { data: object })

// 接触限制
export const unfreezeAPI = object =>
  request('admin/user/user/closeExpressCollectionTimeLimit', 'post', { data: object })

// 注销账号
export const closeAccountAPI = object => request('admin/user/user/closeAccount', 'post', { data: object })

// 密码管理
export const resetPasswordAPI = object => request('admin/user/user/resetPassword', 'post', { data: object })

// 查看图片
export const viewPhotoAPI = id => request('admin/user/user/detail', 'post', { data: id })

// 获取交易状态详情
export const getStatusAPI = object => request('admin/statistics/user/tradeStats', 'post', { data: object })

// 获取费率数据
export const getRateListAPI = object => request('admin/user/ChannelRate/index', 'get', { params: object })

// 获取信用卡列表
export const getCardListAPI = object => request('admin/user/CreditCard/index', 'post', { data: object })

// 信用卡列表新增
export const addBankListAPI = object => request('admin/user/CreditCard/add', 'post', { data: object })

// 信用卡列表修改
export const editBankListAPI = object => request('admin/user/CreditCard/edit', 'post', { data: object })

// 储蓄卡列表
export const getPosListAPI = object => request('admin/user/DebitCard/index', 'post', { data: object })

// 储蓄卡列表新增
export const addPosListAPI = object => request('admin/user/DebitCard/add', 'post', { data: object })

// 会员关系修改
export const userAboutEditAPI = object => request('admin/user/relation/transfer', 'post', { data: object })

// 审核手持
export function checkRealVerify(data) {
  return request('admin/user/RealVerify/check', 'post', { data: { brand_id: process.env.VUE_APP_BRAND_ID, ...data } })
}

// 结算卡列表
export const getAccountListAPI = object => request('admin/trade/TradeDebitCard/index', 'get', { params: object })

// 通过
export const isPassAPI = object => request('admin/trade/TradeDebitCard/check', 'post', { data: object })

// 修正
export const amendmentAPI = id => request('admin/trade/TradeDebitCard/upgrade', 'post', { data: id })

// 获取地区
export const getProvinceAPI = data => request('admin/dict/area/province', 'post', { data })
export const getCityAPI = data => request('admin/dict/area/city', 'post', { data })
export const getAreaAPI = data => request('admin/dict/area/area', 'post', { data })
export const editCardAPI = data => request('admin/trade/TradeDebitCard/update', 'post', { data })
export const editRateAPI = data => request('admin/user/ChannelRate/edit', 'post', { data })

export const delBankList = id => request('admin/user/CreditCard/del', 'post', { data: id })
export const clearInfoAPI = id => request('admin/user/CreditCard/clearSign', 'post', { data: id })
export const clearAllAPI = id => request('admin/user/CreditCard/clearSignLimit', 'post', { data: id })
